package mammuthus.web.bean

import java.util
import scala.beans.BeanProperty
import scala.collection.JavaConversions._

/**
 * Created by fengbingjian on 15/5/3 12:52.
 */
class SlaveBean {

  @BeanProperty
  var hostName:String = null
  @BeanProperty
  var ip: String = null
  @BeanProperty
  var cpuCores: Int = 0
  @BeanProperty
  var memory: Int = 0

  @BeanProperty
  var docker: DockerSupport = null

  def getSimpleName = hostName.replace("-", "").replace(".", "")
}
class DockerSupport {
  @BeanProperty
  var enable: Boolean = false
  @BeanProperty
  var instances: util.List[DockerInstance] = null
}
class DockerInstance {
  @BeanProperty
  var id: String = null
  @BeanProperty
  var ip: String = null
}
